<template>
  <div>
    api测试
  </div>  
</template>

<script>
export default {
  created () {
    this.axios.get('/test')
    .then(res => {})
    .catch(err => {
      if (err.message.includes('timeout')) {
        let toast = this.$createToast({
          txt: '请求超时',
          type: 'txt'
        })
        toast.show()
      }
      else {
        console.log(err)
      }
    })
  }
}
</script>

<style lang="stylus" scoped>

</style>